<?php

namespace App\Http\Requests\Mini\Shop;


use Illuminate\Foundation\Http\FormRequest;

class Feedback extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 2021/3/10--13:13
     * @return string[]
     * @author:董宗澳
     * @email:2453611300
     * @wechat:DZA74941
     * @QQ:2453611300
     * @web:www.quzha.net
     * @method:rules
     * @effect: 反馈添加验证规则
     */
    public function rules()
    {
        return [
            'feedback_class_id' => 'required',
            'feedback_content' => 'required',
            'feedback_images' => 'required'
        ];
    }

    /**
     * @return array|void
     */
    public function messages()
    {
        return [
            'feedback_content.required' => '请填写反馈内容',
            'feedback_images.required' => '请上传问题图片',
            'feedback_class_id.required' => '请选择问题类型'
        ];
    }
}
